package com.itheima.web;

/**
 * @author Xiao
 * @date 2021/8/29
 */

import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebServlet;

/**体系结构：继承MyHttpServlet类
 * MyHttpServlet类封装了service()处理不同请求分别进行业务逻辑处理的方法*/
@WebServlet("/demo5")
public class ServletDemo05 extends MyHttpServlet{
    @Override
    protected void doPost(ServletRequest servletRequest, ServletResponse servletResponse) {
        //post业务逻辑
        System.out.println("post...");
    }

    @Override
    protected void doGet(ServletRequest servletRequest, ServletResponse servletResponse) {
        //get业务逻辑
        System.out.println("get...");
    }
}
